package org.nanotek.tika.file;

import java.util.Date;

import org.nanotek.Base;

@SuppressWarnings("serial")
public class FileIdentity implements Base<String> {

	private String id; 
	private String name; 
	private String sortName; 
	private String cksum; 
	private String type; 
	private String pattern; 
	private Date dateDetected;
	
	public FileIdentity() {
	}

	@Override
	public String getId() {
		return id;
	}

	@Override
	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSortName() {
		return sortName;
	}

	public void setSortName(String sortName) {
		this.sortName = sortName;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getPattern() {
		return pattern;
	}

	public void setPattern(String pattern) {
		this.pattern = pattern;
	}

	public String getCksum() {
		return cksum;
	}

	public void setCksum(String cksum) {
		this.cksum = cksum;
	}

	public Date getDateDetected() {
		return dateDetected;
	}

	public void setDateDetected(Date dateDetected) {
		this.dateDetected = dateDetected;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result
				+ ((sortName == null) ? 0 : sortName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		FileIdentity other = (FileIdentity) obj;
		if (id == null) {
			if (other.id != null) {
				return false;
			}
		} else if (!id.equals(other.id)) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "FileIdentity [id=" + id + ", type=" + type + ", dateDetected=" + dateDetected
				+ "]";
	}

	

}
